package com.tte.common.producer.test;

/**
 * ProducerThread
 */
public class ProducerThread extends Thread{
    private BufferBlock block;
    public ProducerThread(BufferBlock block){
        this.block = block;
    }
    @Override
    public void run() {
        for(int i=0;i<10;i++){
            Food food = new Food(i);
            this.block.push(food);
            System.out.println("生产食物：" + food.getId());
        }
    }
}